package main

import (
	"log"
	"time"
)

func main() {
	/*c := make(chan int)
	for i := 0; i < 5; i++ {
		go func() {
			c <- 1
		}()
	}
	for x := range c {
		print(x)
	}*/
	/*
		{

			print("1")
			defer func() {
				print("defer")
			}()
			print("2")
		}
		print("3") //output: 123defer*/
	/*c := make(chan bool)
	go func() {
		close(c)
	}()
	time.Sleep(time.Second)
	if _, ok := <-c; true {
		log.Printf("%v", ok)
	}*/
	for {

		select {
		case <-time.After(time.Second):
			log.Printf("1")
		case <-time.After(time.Second):
			log.Printf("2")
		}
	}
}
